﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Products.aspx.cs" Inherits="GetQuote.Web.Admin.Products" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h3>Products</h3>
    <dx:ASPxGridView ID="gridProduct" runat="server" Width="100%" Theme="Office2010Silver" DataSourceID="ProductDataSource">
        <Columns>
            <dx:GridViewDataColumn FieldName="ProductId" VisibleIndex="1" Settings-AllowSort="False" Settings-AllowAutoFilter="False" Width="90px" HeaderStyle-HorizontalAlign="Center">
                <HeaderTemplate>
                    <a href="ProductForm.aspx" id="linkAdd">Add New</a>
                </HeaderTemplate>
                <DataItemTemplate>
                    <a href="ProductForm.aspx">Edit</a> | 
                    <a href="#" onclick="confirm('Do you really want to delete this product?'); return false;">Delete</a>
                </DataItemTemplate>
            </dx:GridViewDataColumn>
            <dx:GridViewDataColumn FieldName="Name" VisibleIndex="2">
            </dx:GridViewDataColumn>
            <dx:GridViewDataComboBoxColumn  FieldName="Manufacturer" VisibleIndex="3">
                <PropertiesComboBox DataSourceID="ManufacturerDataSource" ValueField="Name" IncrementalFilteringMode="StartsWith"
                    TextField="Name" ValueType="System.String" DropDownStyle="DropDown" />
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataComboBoxColumn  FieldName="Category" VisibleIndex="4">
                <PropertiesComboBox DataSourceID="CategoryDataSource" ValueField="Name" IncrementalFilteringMode="StartsWith"
                    TextField="Name" ValueType="System.String" DropDownStyle="DropDown" />
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataColumn FieldName="DisplayWH" VisibleIndex="5" Caption="Width x Height" Settings-AllowAutoFilter="False" Width="100px" />
            <dx:GridViewDataColumn FieldName="Price" VisibleIndex="5" Settings-AllowAutoFilter="False" Width="100px" />
        </Columns>
        <SettingsBehavior ColumnResizeMode="NextColumn" />
        <Settings ShowFilterRow="True" />
    </dx:ASPxGridView>
    <asp:LinqDataSource ID="ProductDataSource" runat="server" onselecting="ProductDataSource_Selecting"></asp:LinqDataSource>
    <asp:LinqDataSource ID="ManufacturerDataSource" runat="server" onselecting="ManufacturerDataSource_Selecting"></asp:LinqDataSource>
    <asp:LinqDataSource ID="CategoryDataSource" runat="server" onselecting="CategoryDataSource_Selecting"></asp:LinqDataSource>
</asp:Content>
